package com.loongtech.bi.manager.player;

import com.loongtech.bi.entity.bigr.ActiveSituation;
import com.loongtech.bi.entity.bigr.BaseMessage;
import com.loongtech.bi.entity.bigr.GatherGeneralSituation;
import com.loongtech.bi.entity.bigr.PaySituation;
import com.loongtech.core.jpa.manager.ManagerQueryCacheBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class BigRPlayerManager extends ManagerQueryCacheBase<Object> {
    private static final long serialVersionUID = 1L;

    @Autowired ActiveSituationManager activeSituationManager;
    @Autowired BaseMessageManager baseMessageManager;
    @Autowired GatherGeneralSituationManager gatherGeneralSituationManager;
    @Autowired PaySituationManager paySituationManager;

    public BigRData getDatas(Date date) {
        BigRData result = new BigRData();

        result.setActiveSituations(activeSituationManager.getDatas(date));
        result.setBaseMessages(baseMessageManager.getDatas(date));
        result.setGatherGeneralSituations(gatherGeneralSituationManager.getDatas(date));
        result.setPaySituations(paySituationManager.getDatas(date));

        return result;
    }

    public class BigRData {
        private List<ActiveSituation> activeSituations;
        private List<BaseMessage> baseMessages;
        private List<GatherGeneralSituation> gatherGeneralSituations;
        private List<PaySituation> paySituations;

        public List<ActiveSituation> getActiveSituations() {
            return activeSituations;
        }

        public void setActiveSituations(List<ActiveSituation> activeSituations) {
            this.activeSituations = activeSituations;
        }

        public List<BaseMessage> getBaseMessages() {
            return baseMessages;
        }

        public void setBaseMessages(List<BaseMessage> baseMessages) {
            this.baseMessages = baseMessages;
        }

        public List<GatherGeneralSituation> getGatherGeneralSituations() {
            return gatherGeneralSituations;
        }

        public void setGatherGeneralSituations(List<GatherGeneralSituation> gatherGeneralSituations) {
            this.gatherGeneralSituations = gatherGeneralSituations;
        }

        public List<PaySituation> getPaySituations() {
            return paySituations;
        }

        public void setPaySituations(List<PaySituation> paySituations) {
            this.paySituations = paySituations;
        }
    }
}
